import api from '@/utils/request'

export const getAllCommandList = () => {
    return api.get('/WebShell/common-commands/queryAll')
}

export const queryCommandList = (data: any) => {
    return api.post('/WebShell/common-commands/query', data)
}

// 根据Id删除一条常用命令
export const deleteCommandItem = (id: any) => {
    return api.post('/WebShell/common-commands/deleteItem?id=' + id)
}

// 根据Id删除一条常用命令
export const saveOrUpdateCommandItem = (command: any) => {
    return api.post('/WebShell/common-commands/saveOrUpdate', command)
}

// 查询所有命令分类列表
export const getAllCommandCategoryList = () => {
    return api.get('/WebShell/common-commands-category/list')
}

// 新增或修改命令分类
export const saveOrUpdateCommandCategory = (data: any) => {
    return api.post('/WebShell/common-commands-category/saveOrUpdate', data)
}

// 删除命令分类
export const deleteCommandCategory = (data: any) => {
    return api.post('/WebShell/common-commands-category/delete', data)
}



